<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/18
 * Time: 16:40
 */
?>
<select>
    <?php

    $years = range(2001, 2020, 1);
    foreach ($years as $item) {
        if ($item == 2017){
            echo " <option selected>$item</option>";
        } else {
            echo " <option>$item</option>";
        }

    }
    ?>
</select>
